package com.lzx.guanchajava.util

object SizeUtil {
    fun px2dp(px: Float) : Float{
        val scale = App.getContext().resources.displayMetrics.density
        return (px / scale) + 0.5f
    }

    fun dp2px(dp: Float) : Float {
        val scale = App.getContext().resources.displayMetrics.density
        return (dp * scale) + 0.5f
    }
}